#pragma once

#include "ModelessDialog.h"

// ShortPosLimitDlg dialog

class ShortPosLimitDlg : public CModelessDialog, public L_Observer
{
	DECLARE_DYNAMIC(ShortPosLimitDlg)

public:
	ShortPosLimitDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~ShortPosLimitDlg();

	virtual BOOL Create(CWnd *pParentWnd = CWnd::FromHandle(L_GetMainWnd()));

// Dialog Data
	enum { IDD = IDD_SHORTPOSLIMITDLG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()

//L_Observer
public:
	virtual void HandleMessage(L_Message const *pMsg);

private:
	//controls
	CListCtrl m_ShortLimitsListCtrl;

	//helpers
	void ResizeControls();
	void UpdateShortLimitList();

	//data
	L_Account *account;
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
};
